package com.commerce.mapping;

import com.commerce.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.dao.DataAccessException;

/**
 * @author wyj
 * @Title:
 * @Description:
 */
@Mapper
public interface UserMapping extends BeanMapping<User>{

    /**
     * 根据OPENID查询用户
     * @param openid
     * @return
     * @throws DataAccessException
     */
    User selectByOpenId(String openid)throws DataAccessException;

    /**
     * 修改登录时间
     * @param id
     * @return
     * @throws DataAccessException
     */
    int updateByUseTime(int id)throws  DataAccessException;
}
